<?php
echo $this->render('picture/special/_tab.phtml');
$this->headScript()->appendFile(_STATIC_HTTP . '/xheditor/xheditor-1.1.9-en.min.js');
?>
<div class="body">
<form action="" method="post" enctype="multipart/form-data">
<?php echo $this->form()->hidden('referer', $this->referer) . "\n";?>
	<table class="form">
		<tr>
			<th colspan="2"><?php if($this->row->getId()) { 
				echo '<span style="float:right;">';
				echo '<a href="'. $this->url('special/index', array('name' => $this->row->getName()))->assemble($this->row->getLocale()->getLang()) . '" target="_blank">';
				echo $this->language('Visit Frontend Page') . '..';
				echo '</a>';
				echo '</span>';
			}?><?php echo $this->language('SPECIAL INFORMATION');?>:</th>
		</tr>
		<tr>
			<td width="180"><label><span class="red">*</span> <?php echo $this->language('Title');?></label></td>
			<td><?php echo $this->form()->text('title', $this->row->getLocale()->getTitle(), array('size'=>'50', 'maxlength'=>'250'));?><code><?php echo $this->language('Between 1~100 characters');?>.</code></td>
		</tr>
		<tr>
			<td><label><span class="red">*</span> <?php echo $this->language('KEY NAME');?></label></td>
			<td><?php echo $this->render('picture/_inc/keyNameInput.phtml');?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Display Order');?></label></td>
			<td><?php echo $this->form()->text('display_order', $this->row->getDisplayOrder(),array('size'=>'10', 'maxlength'=>'10'));?><code><?php echo $this->language('Numeric Only');?>.</code></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Category');?></label></td>
			<td><?php echo $this->partial('picture/_inc/categoryCheckbox.phtml', array('name' => 'category_id[]', 'selected' => $this->categoryList, 'type' => 'checkbox'));?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Cover');?></label></td>
			<td><?php echo $this->partial('picture/_inc/uploadInput.phtml', array('image' => $this->row->getCover(), 'name' => 'cover', 'edit' => $this->row->getId()));?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Actived');?>?</label></td>
			<td><?php echo $this->form()->select('is_active', $this->row->getIsActive(), array(), array('0' => 'No', '1' => 'Yes'));?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Tag');?></label></td>
			<td>
				<?php echo $this->form()->text('tag', implode(';', $this->row->getKeywords($this->row->getLocale()->getLang())), array('size' => '50;', 'maxlength' => '50'));?>
				<code><?php echo $this->language('Separate multiple Tags in ";"');?>;</code>
			</td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Description');?></label></td>
			<td><?php echo $this->form()->textarea('description', $this->row->getLocale()->getDescription(), array('cols' => '70', 'rows' => '5'));?></td>
		</tr>
		<tr>
			<td><label><?php echo $this->language('Content');?></label></td>
			<td><?php echo $this->form()->textarea('content', $this->row->getLocale()->getContent(), array('class' => 'xheditor', 'style' => 'width:95%;height:280px;'));?></td>
		</tr>
		<tr>
			<td></td>
			<td>
				<button type="submit" name="submit" value="submit"><?php echo $this->language('Submit');?></button>
				<?php if($this->row->getId()) { ?>
				<a href="<?php echo $this->url('picture/special/delete', array('id' => $this->row->getId()));?>" class="button"><?php echo $this->language('Delete');?>»</a>
				<?php } ?>
			</td>
		</tr>
	</table>
</form>
</div>
